#pragma once

#include <iostream>
#include <fstream>
#include <string>
#include <istream>
#include <ostream>
#include <vector>
#include <map>
#include <unordered_map>
#include <memory>
#include <filesystem>
#include <queue>
#include <deque>
#include <unordered_set>
#include <set>
#include <chrono>
#include <thread>
#include <cstring>
#include <assert.h>
#include <mutex>

namespace fs = std::filesystem;

#ifdef _WIN32
#include <Windows.h>
using SOCKLEN = int;
#endif

#ifdef __linux__
#include <unistd.h>
#include <cstdlib>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/ipc.h>
#include <sys/acct.h>
#include <sys/auxv.h>

using SOCKLEN= unsigned int;

#ifdef __ANDROID__
#include <android/log.h>
#include <android_native_app_glue.h>
#include <android/asset_manager.h>


#else

#endif
#endif

#pragma warning(disable : 4305)
#pragma warning(disable : 4005)
#pragma warning(disable : 4244)

#define WEB_FAILED(X, Y)  \
    {                     \
        if (X != Y)       \
        {                 \
            return false; \
        };                \
    }\

#define OUT_LOG(x, y)                        \
    {                                        \
        std::ofstream ofs(y, std::ios::out); \
        ofs << x;                            \
        ofs.flush();                         \
        ofs.close();                         \
    }                                       \
                                             \

